/**
 * Conditions，执行条件
 */
export interface IConditions {
  /**
   * 条件
   */
  conditions: ICondition[];
  conjs?: EConj[];
  splitIndexes?: number[];
}

/**
 * Condition，条件
 */
export interface ICondition {
  id?: string;
  /**
   * 左边表达式
   */
  left?: string;
  /**
   * 运算符
   */
  operator?: EOperator;
  /**
   * 右边表达式
   */
  right?: string;
  /**
   * 右边表达式类型
   */
  rightType?: ERightType;
}

/**
 * 运算符
 */
export enum EOperator {
  Eq = 'EQ',
  Ge = 'GE',
  Gt = 'GT',
  In = 'IN',
  IsEmpty = 'IS_EMPTY',
  IsNotEmpty = 'IS_NOT_EMPTY',
  LE = 'LE',
  Like = 'LIKE',
  Lt = 'LT',
  Neq = 'NEQ',
  NotIn = 'NOT_IN',
  NotLike = 'NOT_LIKE'
}

/**
 * 右边表达式类型
 */
export enum ERightType {
  Constant = 'CONSTANT',
  Variable = 'VARIABLE',
  Expression = 'EXPRESSION'
}

export enum EConj {
  And = 'AND',
  Or = 'OR'
}

export interface IVariable {
  /** 名称 */
  label: string;
  /** 值 */
  value: string;
}

export interface ILeft {
  /** 名称 */
  label: string;
  /** 值 */
  value: string;
}
